package org.orange.springboot.simulate.springboots.test.service.impl;


import org.orange.springboot.simulate.springboots.test.service.OrderService;
import org.orange.springboot.simulate.springboots.test.service.UserService;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("orderService")
//@Scope("prototype") //多例
public class OrderServiceImpl implements OrderService, BeanNameAware {

    @Autowired
    UserService userService;

    private String beanName;

    @Override
    public void setBeanName(String beanName) {
        this.beanName = "orderService";
    }

    public void submitOrder(){
//        userService.sayHello();
        System.out.println("下单。。。");
    }

    public void delOrder(){
        System.out.println("退单。。。");
    }

}
